import request from '@/utils/request'

export default {
    getListeningTypeList() {
        return request({
            url: `/admin/studyservice/studyListeningType/getListeningTypeList`,
            method: 'get'
        })
    },

    deleteListeningTypeById(id) {
        return request({
            url: `/admin/studyservice/studyListeningType/deleteListeningTypeById/${id}`,
            method: 'delete',
        })
    },

    getListeningType(id) {
        return request({
            url: `/admin/studyservice/studyListeningType/getListeningType/${id}`,
            method: 'get',
        })
    },

    addListeningType(studyListeningType) {
        return request({
            url: `/admin/studyservice/studyListeningType/addListeningType`,
            method: 'post',
            data: studyListeningType
        })
    },

    updateListeningTypeMsg(studyListeningType) {
        return request({
          url: `/admin/studyservice/studyListeningType/updateListeningTypeMsg`,
          method: 'post',
          data : studyListeningType
        })
    },

    // 条件查询单词分页
    pageListeningCondition(current, limit, listeningQuery) {
        return request({
          url: `/admin/studyservice/studyListening/pageListeningCondition/${current}/${limit}`,
          method: 'post',
          data : listeningQuery
        })
    },

    deleteListeningById(id) {
        return request({
            url: `/admin/studyservice/studyListening/deleteListeningById/${id}`,
            method: 'delete',
        })
    },

    getListeningById(id) {
        return request({
            url: `/admin/studyservice/studyListening/getListeningById/${id}`,
            method: 'get',
        })
    },

    addListening(studyListening) {
        return request({
            url: `/admin/studyservice/studyListening/addListening`,
            method: 'post',
            data: studyListening
        })
    },

    updateListening(studyListening) {
        return request({
            url: `/admin/studyservice/studyListening/updateListening`,
            method: 'post',
            data: studyListening
        })
    },

    pageReadingCondition(current, limit, bookQuery) {
        return request({
          url: `/admin/studyservice/studyReading/pageReadingCondition/${current}/${limit}`,
          method: 'post',
          data : bookQuery
        })
    },

    deleteReadingById(id) {
        return request({
            url: `/admin/studyservice/studyReading/deleteReadingById/${id}`,
            method: 'delete',
        })
    },

    getReadingById(id) {
        return request({
            url: `/admin/studyservice/studyReading/getReadingById/${id}`,
            method: 'get',
        })
    },

    addReading(studyReading) {
        return request({
            url: `/admin/studyservice/studyReading/addReading`,
            method: 'post',
            data: studyReading
        })
    },

    updateReading(studyReading) {
        return request({
            url: `/admin/studyservice/studyReading/updateReading`,
            method: 'post',
            data: studyReading
        })
    },

}
